﻿using SqlSugar;
using static DataModels.Enums.AuthCore.UserEnum;
using static DataModels.Enums.GeneralEnum;

namespace DataModels.Entities.AuthCore
{
    [SugarTable("user")]
    public class User
    {
        [SugarColumn(IsPrimaryKey = true, ColumnName = "UUID")]
        public Guid UUID { get; set; }


        /// <summary>
        /// 手机号
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// vx唯一ID
        /// </summary>
        public string VXOpenId { get; set; }

        /// <summary>
        /// 登录名
        /// </summary>
        public string LoginName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// 显示名称
        /// </summary>
        public string DisplayName { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        public string AvatarUrl { get; set; }
        
        /// <summary>
        /// 性别
        /// </summary>
        public Gender Gender { get; set; }

        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTime Birthday { get; set; }

        /// <summary>
        /// 注册类型
        /// </summary>
        public RegisterType RegisterType { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public UserStatus Status { get; set; } = UserStatus.Enable;

        /// <summary>
        /// 注册时间
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 0为物业1为医院普通2为商户用户3为医院领导
        /// </summary>
        public int IsHospital { get; set; }
        /// <summary>
        /// 组织UUID
        /// </summary>
        public string OrganiztionsUUID { get; set; }
        /// <summary>
        /// 职位UUID
        /// </summary>
        public string PositionUUID { get; set; }
        /// <summary>
        /// 楼栋列表
        /// </summary>
        public string BuildIdS { get; set; }
    }
}
